<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title></title>
    <link rel="stylesheet" href="${staticServer}/inc/style/main.css"/>
    <link rel="stylesheet" href="${staticServer}/inc/style/page.css"/>
    <link rel="stylesheet" href="${staticServer}/css/struct_info.css"/>
    <script src="${staticServer}/inc/js/jquery.js"></script>
    <script src="${staticServer}/inc/js/pageset.js"></script>
    <script src="${staticServer}/inc/js/submitter.js"></script>
    <script src="${staticServer}/inc/js/infopad.js?2.2"></script>
    <script type="text/javascript" src="${staticServer}/common/uploadify/jquery.uploadify.js"></script>
    <script type="text/javascript" src="${staticServer}/js/web/uploadImg.js?1.5"></script>

    <link rel="stylesheet" href="${staticServer}/inc/style/date/datepicker.css"/>
    <script src="${staticServer}/inc/js/datepicker.js"></script>

    <style>
        #SWFUpload_0 {
            margin-top: 70px;
            margin-left: -30px;
        }
    </style>
    <script>
        var contextPath = '${contextPath}';
        var _contextPath = '${staticServer}';

        $(function () {
            $("#type").val("<#if goods??>${goods.type}</#if>");
            $("#center_id").val("<#if goods??>${goods.center_id}</#if>");
            $("#purpose").val("<#if goods??>${goods.purpose}</#if>");
            $("#state").val("<#if goods??>${goods.state}</#if>");
            
        var good_mnus = '<#if goods??>${goods.good_pard_id}</#if>';
		if(good_mnus==1){
			$("#dnxh").show();
			$("#bh").show();
			$("#fey").hide();
			$("#kdxh").hide();
			$("#contz").show();
			$("#nummone").show();
			$("#numb").show();
		}else if(good_mnus==2){
			$("#kdxh").show();
			$("#fey").show();
			$("#dnxh").hide();
			$("#bh").hide();
			$("#contz").hide();
			$("#nummone").hide();
			$("#numb").hide();
		}else if(good_mnus==3){
			$("#cglink").show();
			$("#dnxh").hide();
			$("#bh").hide();
			$("#fey").hide();
			$("#kdxh").hide();
			$("#contz").show();
			$("#nummone").show();
			$("#numb").show();
		}else{
			$("#dnxh").hide();
			$("#bh").hide();
			$("#fey").hide();
			$("#kdxh").hide();
			$("#cglink").hide();
			$("#contz").show();
			$("#nummone").show();
			$("#numb").show();
		}  
        });
            

  

    </script>
    <script>
         function save(id) {
            var auditStatus = $("[name='auditStatus']").filter(":checked").attr("id");
            var msg = $("#auditInfo").val();
            if (msg == "") {
                infopad.err("请填写审核备注!");
                return;
            }
           $.post("${contextPath}/goods/ajaxAudit.json", {
                "id": id,
                "auditStatus": auditStatus, 
                "msg": msg
                },function (ms) {
                var msg = ms.msg;
                if (msg != null && msg == "1") {
                	infopad.msg("操作成功！");
                    window.location.href = "${contextPath}/goods/ShGoods.htm";
                } else {
                    alert("操作失败!");
                }
            });


        }
        
        
    </script>
</head>
<input type="hidden" id="id" value="<#if goods??>${goods.id}</#if>">
<body>
<div id="home_link">
    <ul>
        <li></li>
        <li>&gt;</li>
        <li>组织架构</li>
        <li>&gt;</li>
        <li class="current">title</li>
    </ul>
</div>

<div id="container">
    <div id="title">物品审核</div>
    <table id="infotable">
        <tr>
            <th>类型:</th>
            <td>
                <#if goods??>
                 	<#if goods.type=="1">
             			   固定资产	
             		<#elseif goods.type=="2">
             			消耗品
             		</#if>		
                </#if>
            </td>
        </tr>

        <tr>
            <th>办公地址:</th>
            <td>
                ${goods.center_name}
            </td>
        </tr>

        <tr>
            <th>物品分类:</th>
            <td>
                ${goods.good_parint_name}:${goods.goods_name}
            </td>
        </tr>
        <tr>
            <th>物品名称:</th>
            <td>${goods.item_name}
            </td>
        </tr>
        <tr id="dnxh" >
            <th >型号:</th>
            <td>${goods.model}</td>
        </tr>
        <tr  id="bh" style="display:none">
            <th>编号/编码:</th>
            <td>${goods.code}</td>
        </tr>
        <tr id="kdxh" style="display:none">
            <th >类型:</th>
            <td>${goods.broadband_type}</td>
        </tr>
        <tr  id="fey" style="display:none">
            <th>费用:</th>
            <td>${goods.supplier}</td>
        </tr>
        <tr id="numb">
            <th>物品数量:</th>
            <td>${goods.number}</td>
        </tr>

        <tr id="nummone">
            <th>物品单价:</th>
            <td>${goods.unit_price}
            </td>
        </tr>
        <tr id="contz">
            <th>总额:</th>
            <td>${goods.total_calculation}
            </td>
        </tr>
        <tr>
            <th>物品单号:</th>
            <td>
            ${goods.purchasing_num}
            </td>
        </tr>
		<tr>
            <th >采购链接:</th>
            <td>${goods.purchasing_link}</td>
        </tr>
        
        <tr>
            <th >物品样图:</th>
            <td>
            <#if goods.img_url??>
            <#list goods.img_url?split(",") as imgurl>
				<#if imgurl_index !=0>
					<a  href ="http://120.55.241.58/${imgurl}" ><img rel="800:485" width="180" height="109.125" src="http://120.55.241.58/${imgurl}"></a>
				</#if>
			</#list>
			</#if>
            </td>
        </tr>
        <tr>
            <th>备注:</th>
            <td>
                <textarea disabled='disabled' style="width:400px;height: 150px;">${goods.msg}</textarea>

            </td>
        </tr>

        <tr>
            
            <#if goods.apply_status=="1">
             		<th>审核:</th>
            <td>
                <textarea id="auditInfo" placeholder="请填写审核说明！" style="width:200px;height: 100px;"></textarea>

                <label><input name="auditStatus" checked="checked" type="radio" id="2"/>通过 </label>
                <label><input name="auditStatus" type="radio" id="1"/>拒绝 </label>
            </td>
             		
            <#elseif goods.apply_status=="2">
             	<th>审核:</th>
             	<td>
             	<label>
             	通过：
             	</label>
             	${goods.sh_msg}
             	</td>
            <#elseif goods.apply_status=="5">
             	<th>审核:</th>
             	<td>
             	<label>
             	未通过：
             	</label>
             	${goods.sh_msg}
             	</td>
            </#if>	
        </tr>
    </table>
    <div id="controlbar">
    		 <#if goods.apply_status=="1">
             		<input type="button" class="submit" onclick="save('${goods.id}')" value="  保  存  "/>
             <#elseif goods.apply_status=="2">
             		<input type="button" onclick="window.history.go(-1);" class="submit" value="  返回列表  " />
             </#if>	
        
        
        
    </div>
</div>

</body>
</html>